<template>
  <div class="title-box">
    <div class="title-main flex-box">
      <p class="left" @click="goBack">
        <svg class="icon" aria-hidden="true">
          <use xlink:href="#icon-gb-xiazai6"></use>
        </svg>
      </p>
      <h5>
        <slot></slot>
      </h5>
      <p class="right">
        <svg class="icon" aria-hidden="true">
          <use xlink:href="#icon-gb-xiazai6"></use>
        </svg>
      </p>
    </div>
  </div>
</template>

<script>
import '@/assets/css/gb-index.scss'
// @ is an alias to /src
export default {
  methods: {
    goBack() {
      this.$router.go(-1)
    }
  }
}
</script>
<style scoped lang="scss">
.title-box {
  width: 100%;
  height: 48px;
  .title-main {
    width: 100%;
    position: fixed;
    height: 48px;
    top: 0;
    left: 0;
    background: #f5f5f5;
    padding: 0 15px;
    font-size: 16px;
    box-sizing: border-box;
    justify-content: space-between;
    border-bottom: 1px solid #e5e5e5;
    z-index: 666;
    .right {
      opacity: 0;
    }
  }
}
</style>
